drop _all
*Make sure you import the Excel data manually, as the filepath between the authors and the user will be different: 
import excel "/Users/jeremyko/Library/CloudStorage/OneDrive-TheChineseUniversityofHongKong/AA Academic Journals Publications Project/Populism_Climate/Replication/Data1.xlsx", sheet("New") firstrow
 
destring, replace
egen Country_id = group(Country)
xtset Country_id Year

gen log_GDP = log(GDP)
gen log_FDI = log(FDI)
gen log_Population_Density = log(Population_Density)
gen log_Urbanization = log(Urbanization)
gen oppvote_d100 = oppvote/100
gen ND_GAIN_10 = ND_GAIN*10
gen Economic_10 = Economic*10
gen Social_10 = Social*10
gen Governance_10 = Governance*10
gen id_soci_01_10 = id_soci_01*10
gen id_soci_02_10 = id_soci_02*10
gen id_soci_03_10 = id_soci_03*10
gen id_soci_04_10 = id_soci_04*10
gen id_gove_01_10 = id_gove_01*10
gen id_gove_02_10 = id_gove_02*10
gen id_gove_03_10 = id_gove_03*10
gen id_gove_04_10 = id_gove_04*10

**Descriptive Statistics for Variables in Table 1:
summarize ND_GAIN_10
summarize Populism
summarize Left_Populism
summarize Right_Populism
summarize Democracy
summarize oppvote
summarize EU_Member
summarize Democracy
summarize log_GDP
summarize log_FDI
summarize log_Population_Density
summarize log_Urbanization

**Descriptive Statistics for Variables in Table 2:
summarize Economic_10
summarize Social_10
summarize id_soci_01
summarize id_soci_02
summarize id_soci_03
summarize id_soci_04
summarize Governance_10
summarize id_gove_01
summarize id_gove_02
summarize id_gove_03
summarize id_gove_04

*Make sure to download the xtabond2 package! 
*Baseline Results for Table 3:
xtabond2 ND_GAIN_10 L.ND_GAIN_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 ND_GAIN_10 L.ND_GAIN_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

**Alternative Measurement (Table A1): 
xtabond2 id_gove_04_10 L.id_gove_04_10 Populism_Power Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism_Power Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep


*Economic Mechanism (Table A2): 
xtabond2 Economic_10 L.Economic_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 Economic_10 L.Economic_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep



*Social Mechanism (Table A3): 
xtabond2 Social_10 L.Social_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 Social_10 L.Social_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

*id_soci_01_10 (Table A4): 
xtabond2 id_soci_01_10 L.id_soci_01_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_soci_01_10 L.id_soci_01_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep


*id_soci_02_10 (Table A5): 
xtabond2 id_soci_02_10 L.id_soci_02_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_soci_02_10 L.id_soci_02_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

*id_soci_03_10 (Table A6): 
xtabond2 id_soci_03_10 L.id_soci_03_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_soci_03_10 L.id_soci_03_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

*id_soci_04_10 (Table A7) 
xtabond2 id_soci_04_10 L.id_soci_04_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_soci_04_10 L.id_soci_04_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep


*Governance Mechanism (Table A8): 
xtabond2 Governance_10 L.Governance_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 Governance_10 L.Governance_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

*id_gove_01_10 (Table A9):
xtabond2 id_gove_01_10 L.id_gove_01_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_gove_01_10 L.id_gove_01_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep


*id_gove_02_10 (Table A10):
xtabond2 id_gove_02_10 L.id_gove_02_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_gove_02_10 L.id_gove_02_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep


*id_gove_03_10 (Table A11):
xtabond2 id_gove_03_10 L.id_gove_03_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_gove_03_10 L.id_gove_03_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep

*id_gove_04_10 (Table A12):
xtabond2 id_gove_04_10 L.id_gove_04_10 Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(Populism Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep
xtabond2 id_gove_04_10 L.id_gove_04_10 ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, gmm(L.ND_GAIN_10, lag(2 2) collapse) gmm(L.ND_GAIN_10, lag(1 1) collapse equation(level)) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization) iv(ib1.Populism_Cat Democracy oppvote_d100 EU_Member log_GDP log_FDI log_Population_Density log_Urbanization, equation(level)) twostep



